package com.myhexin.demo.ignite.test.base;

import org.apache.ignite.Ignition;
import org.apache.ignite.client.ClientCluster;
import org.apache.ignite.client.IgniteClient;
import org.apache.ignite.cluster.ClusterState;
import org.apache.ignite.configuration.ClientConfiguration;

public class ClusterAPIDemo {

    private static final String IGNITE_ADDR = "127.0.0.1:10800";

    public static void main(String[] args) {
        ClientConfiguration cfg = new ClientConfiguration();
        cfg.setAddresses(IGNITE_ADDR);
        try (IgniteClient client = Ignition.startClient(cfg)) {
            ClientCluster cluster = client.cluster();
            cluster.state(ClusterState.ACTIVE);
//            cluster.
        }
    }
}
